import pytest


@pytest.fixture(scope="function", autouse=True)
# fixture固件
def connection_mysql():
    print("连接数据库")
    yield
    print("关闭数据库")


# def setup_method(self):
#     print('每个用例之前操作')
#
#
# def teardown_method(self):
#     print("每个用例之后操作")
#
#
# def setup_class(self):
#     print('每个类之前操作')
#
#
# def teardown_class(self):
#     print('每个类之后操作')
